package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyComment;
import cn.wolfcode.trip.base.query.LikeQueryObject;
import cn.wolfcode.trip.base.query.StrategyCatalogQueryObject;
import cn.wolfcode.trip.base.query.UserProfilesQueryObject;

import java.util.List;

public interface StrategyCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyComment record);

    StrategyComment selectByPrimaryKey(Long id);

    List<StrategyComment> selectAll();

    int updateByPrimaryKey(StrategyComment record);

    List<StrategyComment> queryCommentsByStrategyId(StrategyCatalogQueryObject qo);

    List<StrategyComment> selectStrategyCommentsByUserId(UserProfilesQueryObject qo);

    /**
     * 保存子评论
     * @param strategyComment 评论对象
     */
    void insertReplyCommrnt(StrategyComment strategyComment);

    StrategyComment selectReplyByPrimaryKey(Long commentId);
    /**
     * 获取评论当前用户的评论的集合
     * @param qo
     * @return
     */
    List<StrategyComment> selectReplyCommentsByUserId(LikeQueryObject qo);

    void updateCommentState(Long id);
}